package com.wz.mapper;

import com.wz.entity.Dep;
import com.wz.entity.Emp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface DepMapper {
    @Select("select * from dep")
    List<Dep> findDep();

    @Delete("delete  from dep where deptno=#{deptno}")
    Integer deleteDep(String deptno);

    @Insert("insert into dep(deptno,empnum,mgr,depname) values(#{deptno},#{empnum},#{mgr},#{depname})")
    int saveDep(Dep dep);
}
